3.2.96 \(\int \frac {\cot ^3(c+d x)}{(a+b \sin (c+d x))^3} \, dx\) [196]

Optimal. Leaf size=145 \[ \frac {3 b \csc (c+d x)}{a^4 d}-\frac {\csc ^2(c+d x)}{2 a^3 d}-\frac {\left (a^2-6 b^2\right ) \log (\sin (c+d x))}{a^5 d}+\frac {\left (a^2-6 b^2\right ) \log (a+b \sin (c+d x))}{a^5 d}-\frac {a^2-b^2}{2 a^3 d (a+b \sin (c+d x))^2}-\frac {a^2-3 b^2}{a^4 d (a+b \sin (c+d x))} \]

[Out]

3*b*csc(d*x+c)/a^4/d-1/2*csc(d*x+c)^2/a^3/d-(a^2-6*b^2)*ln(sin(d*x+c))/a^5/d+(a^2-6*b^2)*ln(a+b*sin(d*x+c))/a^
5/d+1/2*(-a^2+b^2)/a^3/d/(a+b*sin(d*x+c))^2+(-a^2+3*b^2)/a^4/d/(a+b*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2800, 908} \begin {gather*} \frac {3 b \csc (c+d x)}{a^4 d}-\frac {\csc ^2(c+d x)}{2 a^3 d}-\frac {\left (a^2-6 b^2\right ) \log (\sin (c+d x))}{a^5 d}+\frac {\left (a^2-6 b^2\right ) \log (a+b \sin (c+d x))}{a^5 d}-\frac {a^2-3 b^2}{a^4 d (a+b \sin (c+d x))}-\frac {a^2-b^2}{2 a^3 d (a+b \sin (c+d x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^3/(a + b*Sin[c + d*x])^3,x]

[Out]

(3*b*Csc[c + d*x])/(a^4*d) - Csc[c + d*x]^2/(2*a^3*d) - ((a^2 - 6*b^2)*Log[Sin[c + d*x]])/(a^5*d) + ((a^2 - 6*
b^2)*Log[a + b*Sin[c + d*x]])/(a^5*d) - (a^2 - b^2)/(2*a^3*d*(a + b*Sin[c + d*x])^2) - (a^2 - 3*b^2)/(a^4*d*(a
 + b*Sin[c + d*x]))

Rule 908

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2800

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot ^3(c+d x)}{(a+b \sin (c+d x))^3} \, dx &=\frac {\text {Subst}\left (\int \frac {b^2-x^2}{x^3 (a+x)^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {b^2}{a^3 x^3}-\frac {3 b^2}{a^4 x^2}+\frac {-a^2+6 b^2}{a^5 x}+\frac {a^2-b^2}{a^3 (a+x)^3}+\frac {a^2-3 b^2}{a^4 (a+x)^2}+\frac {a^2-6 b^2}{a^5 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {3 b \csc (c+d x)}{a^4 d}-\frac {\csc ^2(c+d x)}{2 a^3 d}-\frac {\left (a^2-6 b^2\right ) \log (\sin (c+d x))}{a^5 d}+\frac {\left (a^2-6 b^2\right ) \log (a+b \sin (c+d x))}{a^5 d}-\frac {a^2-b^2}{2 a^3 d (a+b \sin (c+d x))^2}-\frac {a^2-3 b^2}{a^4 d (a+b \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.63, size = 121, normalized size = 0.83 \begin {gather*} -\frac {-6 a b \csc (c+d x)+a^2 \csc ^2(c+d x)+2 \left (a^2-6 b^2\right ) \log (\sin (c+d x))-2 \left (a^2-6 b^2\right ) \log (a+b \sin (c+d x))+\frac {a^2 (a-b) (a+b)}{(a+b \sin (c+d x))^2}+\frac {2 a \left (a^2-3 b^2\right )}{a+b \sin (c+d x)}}{2 a^5 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^3/(a + b*Sin[c + d*x])^3,x]

[Out]

-1/2*(-6*a*b*Csc[c + d*x] + a^2*Csc[c + d*x]^2 + 2*(a^2 - 6*b^2)*Log[Sin[c + d*x]] - 2*(a^2 - 6*b^2)*Log[a + b
*Sin[c + d*x]] + (a^2*(a - b)*(a + b))/(a + b*Sin[c + d*x])^2 + (2*a*(a^2 - 3*b^2))/(a + b*Sin[c + d*x]))/(a^5
*d)

________________________________________________________________________________________

Maple [A]
time = 0.45, size = 131, normalized size = 0.90

method result size
derivativedivides \(\frac {-\frac {1}{2 a^{3} \sin \left (d x +c \right )^{2}}+\frac {\left (-a^{2}+6 b^{2}\right ) \ln \left (\sin \left (d x +c \right )\right )}{a^{5}}+\frac {3 b}{a^{4} \sin \left (d x +c \right )}+\frac {\left (a^{2}-6 b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{5}}-\frac {a^{2}-3 b^{2}}{a^{4} \left (a +b \sin \left (d x +c \right )\right )}-\frac {a^{2}-b^{2}}{2 a^{3} \left (a +b \sin \left (d x +c \right )\right )^{2}}}{d}\) \(131\)
default \(\frac {-\frac {1}{2 a^{3} \sin \left (d x +c \right )^{2}}+\frac {\left (-a^{2}+6 b^{2}\right ) \ln \left (\sin \left (d x +c \right )\right )}{a^{5}}+\frac {3 b}{a^{4} \sin \left (d x +c \right )}+\frac {\left (a^{2}-6 b^{2}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{5}}-\frac {a^{2}-3 b^{2}}{a^{4} \left (a +b \sin \left (d x +c \right )\right )}-\frac {a^{2}-b^{2}}{2 a^{3} \left (a +b \sin \left (d x +c \right )\right )^{2}}}{d}\) \(131\)
risch \(-\frac {2 i \left (3 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-18 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}-6 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-10 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+36 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+5 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}+18 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+3 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-18 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-5 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}-18 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}+6 b^{3} {\mathrm e}^{i \left (d x +c \right )}\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )^{2} d \,a^{4}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{d \,a^{3}}-\frac {6 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right ) b^{2}}{a^{5} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d \,a^{3}}+\frac {6 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) b^{2}}{a^{5} d}\) \(380\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)^3/(a+b*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/2/a^3/sin(d*x+c)^2+(-a^2+6*b^2)/a^5*ln(sin(d*x+c))+3/a^4*b/sin(d*x+c)+(a^2-6*b^2)/a^5*ln(a+b*sin(d*x+c
))-(a^2-3*b^2)/a^4/(a+b*sin(d*x+c))-1/2*(a^2-b^2)/a^3/(a+b*sin(d*x+c))^2)

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 156, normalized size = 1.08 \begin {gather*} \frac {\frac {4 \, a^{2} b \sin \left (d x + c\right ) - 2 \, {\left (a^{2} b - 6 \, b^{3}\right )} \sin \left (d x + c\right )^{3} - a^{3} - 3 \, {\left (a^{3} - 6 \, a b^{2}\right )} \sin \left (d x + c\right )^{2}}{a^{4} b^{2} \sin \left (d x + c\right )^{4} + 2 \, a^{5} b \sin \left (d x + c\right )^{3} + a^{6} \sin \left (d x + c\right )^{2}} + \frac {2 \, {\left (a^{2} - 6 \, b^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{5}} - \frac {2 \, {\left (a^{2} - 6 \, b^{2}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{5}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*((4*a^2*b*sin(d*x + c) - 2*(a^2*b - 6*b^3)*sin(d*x + c)^3 - a^3 - 3*(a^3 - 6*a*b^2)*sin(d*x + c)^2)/(a^4*b
^2*sin(d*x + c)^4 + 2*a^5*b*sin(d*x + c)^3 + a^6*sin(d*x + c)^2) + 2*(a^2 - 6*b^2)*log(b*sin(d*x + c) + a)/a^5
 - 2*(a^2 - 6*b^2)*log(sin(d*x + c))/a^5)/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 404 vs. \(2 (141) = 282\).
time = 0.40, size = 404, normalized size = 2.79 \begin {gather*} -\frac {4 \, a^{4} - 18 \, a^{2} b^{2} - 3 \, {\left (a^{4} - 6 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left ({\left (a^{2} b^{2} - 6 \, b^{4}\right )} \cos \left (d x + c\right )^{4} + a^{4} - 5 \, a^{2} b^{2} - 6 \, b^{4} - {\left (a^{4} - 4 \, a^{2} b^{2} - 12 \, b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b - 6 \, a b^{3} - {\left (a^{3} b - 6 \, a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) + 2 \, {\left ({\left (a^{2} b^{2} - 6 \, b^{4}\right )} \cos \left (d x + c\right )^{4} + a^{4} - 5 \, a^{2} b^{2} - 6 \, b^{4} - {\left (a^{4} - 4 \, a^{2} b^{2} - 12 \, b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{3} b - 6 \, a b^{3} - {\left (a^{3} b - 6 \, a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) - 2 \, {\left (a^{3} b + 6 \, a b^{3} + {\left (a^{3} b - 6 \, a b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{5} b^{2} d \cos \left (d x + c\right )^{4} - {\left (a^{7} + 2 \, a^{5} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{7} + a^{5} b^{2}\right )} d - 2 \, {\left (a^{6} b d \cos \left (d x + c\right )^{2} - a^{6} b d\right )} \sin \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/2*(4*a^4 - 18*a^2*b^2 - 3*(a^4 - 6*a^2*b^2)*cos(d*x + c)^2 - 2*((a^2*b^2 - 6*b^4)*cos(d*x + c)^4 + a^4 - 5*
a^2*b^2 - 6*b^4 - (a^4 - 4*a^2*b^2 - 12*b^4)*cos(d*x + c)^2 + 2*(a^3*b - 6*a*b^3 - (a^3*b - 6*a*b^3)*cos(d*x +
 c)^2)*sin(d*x + c))*log(b*sin(d*x + c) + a) + 2*((a^2*b^2 - 6*b^4)*cos(d*x + c)^4 + a^4 - 5*a^2*b^2 - 6*b^4 -
 (a^4 - 4*a^2*b^2 - 12*b^4)*cos(d*x + c)^2 + 2*(a^3*b - 6*a*b^3 - (a^3*b - 6*a*b^3)*cos(d*x + c)^2)*sin(d*x +
c))*log(-1/2*sin(d*x + c)) - 2*(a^3*b + 6*a*b^3 + (a^3*b - 6*a*b^3)*cos(d*x + c)^2)*sin(d*x + c))/(a^5*b^2*d*c
os(d*x + c)^4 - (a^7 + 2*a^5*b^2)*d*cos(d*x + c)^2 + (a^7 + a^5*b^2)*d - 2*(a^6*b*d*cos(d*x + c)^2 - a^6*b*d)*
sin(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{3}{\left (c + d x \right )}}{\left (a + b \sin {\left (c + d x \right )}\right )^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)**3/(a+b*sin(d*x+c))**3,x)

[Out]

Integral(cot(c + d*x)**3/(a + b*sin(c + d*x))**3, x)

________________________________________________________________________________________

Giac [A]
time = 7.39, size = 154, normalized size = 1.06 \begin {gather*} -\frac {\frac {2 \, {\left (a^{2} - 6 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{5}} - \frac {2 \, {\left (a^{2} b - 6 \, b^{3}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{5} b} + \frac {2 \, a^{2} b \sin \left (d x + c\right )^{3} - 12 \, b^{3} \sin \left (d x + c\right )^{3} + 3 \, a^{3} \sin \left (d x + c\right )^{2} - 18 \, a b^{2} \sin \left (d x + c\right )^{2} - 4 \, a^{2} b \sin \left (d x + c\right ) + a^{3}}{{\left (b \sin \left (d x + c\right )^{2} + a \sin \left (d x + c\right )\right )}^{2} a^{4}}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)^3/(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/2*(2*(a^2 - 6*b^2)*log(abs(sin(d*x + c)))/a^5 - 2*(a^2*b - 6*b^3)*log(abs(b*sin(d*x + c) + a))/(a^5*b) + (2
*a^2*b*sin(d*x + c)^3 - 12*b^3*sin(d*x + c)^3 + 3*a^3*sin(d*x + c)^2 - 18*a*b^2*sin(d*x + c)^2 - 4*a^2*b*sin(d
*x + c) + a^3)/((b*sin(d*x + c)^2 + a*sin(d*x + c))^2*a^4))/d

________________________________________________________________________________________

Mupad [B]
time = 6.79, size = 334, normalized size = 2.30 \begin {gather*} \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (22\,a\,b^2-a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (26\,a^2\,b-8\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (22\,a^2\,b-32\,b^3\right )-\frac {a^3}{2}+4\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a^4-96\,a^2\,b^2+112\,b^4\right )}{2\,a}}{d\,\left (4\,a^6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\,a^6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (8\,a^6+16\,a^4\,b^2\right )+16\,a^5\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+16\,a^5\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^3\,d}+\frac {3\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^4\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2-6\,b^2\right )}{a^5\,d}+\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,\left (a^2-6\,b^2\right )}{a^5\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)^3/(a + b*sin(c + d*x))^3,x)

[Out]

(tan(c/2 + (d*x)/2)^2*(22*a*b^2 - a^3) + tan(c/2 + (d*x)/2)^3*(26*a^2*b - 8*b^3) + tan(c/2 + (d*x)/2)^5*(22*a^
2*b - 32*b^3) - a^3/2 + 4*a^2*b*tan(c/2 + (d*x)/2) - (tan(c/2 + (d*x)/2)^4*(a^4 + 112*b^4 - 96*a^2*b^2))/(2*a)
)/(d*(4*a^6*tan(c/2 + (d*x)/2)^2 + 4*a^6*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^4*(8*a^6 + 16*a^4*b^2) + 16
*a^5*b*tan(c/2 + (d*x)/2)^3 + 16*a^5*b*tan(c/2 + (d*x)/2)^5)) - tan(c/2 + (d*x)/2)^2/(8*a^3*d) + (3*b*tan(c/2
+ (d*x)/2))/(2*a^4*d) - (log(tan(c/2 + (d*x)/2))*(a^2 - 6*b^2))/(a^5*d) + (log(a + 2*b*tan(c/2 + (d*x)/2) + a*
tan(c/2 + (d*x)/2)^2)*(a^2 - 6*b^2))/(a^5*d)

________________________________________________________________________________________